package me.sealer.algorithm.hash.node;

/**
 * @author sealer
 * @date 2018/06/04.
 * @email 1178884049@qq.com
 */
public class RealServerNode implements Node {
    private String host;
    private int port;

    public RealServerNode(String host, int port) {
        this.host = host;
        this.port = port;
    }

    public String getHost() {
        return host;
    }

    public int getPort() {
        return port;
    }

    @Override
    public String genHashKey() {
        return host + ":" + port;
    }

    @Override
    public String toString() {
        return "RealServerNode{" +
                "host='" + host + '\'' +
                ", port=" + port +
                '}';
    }
}
